/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2019.
 * Description: add cache_ecc_check support
 * Author: xukuohai <xukuohai@huawei.com>
 * Create: 2018-12-15
 */

#ifndef __CACHE_ECC_CHECK_H
#define __CACHE_ECC_CHECK_H

#include <linux/notifier.h>

#ifdef CONFIG_HISI_EARLY_DIE_NOTIFIER
extern int register_early_die_notifier(struct notifier_block *nb);
extern int unregister_early_die_notifier(struct notifier_block *nb);
extern int call_early_die_notifiers(unsigned int user_mode, void *reg);
#endif

#ifdef CONFIG_HISI_USR_DIE_NOTIFIER
extern int register_usr_die_notifier(struct notifier_block *nb);
extern int unregister_usr_die_notifier(struct notifier_block *nb);
extern int call_usr_die_notifiers(void);
#endif

#ifdef CONFIG_HISI_EARLY_RESET_NOTIFIER
extern int register_early_reset_notifier(struct notifier_block *nb);
extern int unregister_early_reset_notifier(struct notifier_block *nb);
extern int call_early_reset_notifiers(void);
#endif

#ifdef CONFIG_HISI_EARLY_PANIC_NOTIFIER
extern int register_early_panic_notifier(struct notifier_block *nb);
extern int unregister_early_panic_notifier(struct notifier_block *nb);
extern int call_early_panic_notifiers(void);
#endif

#ifdef CONFIG_RTOS_RESET_NOTIFIER
extern int register_reset_notifier(struct notifier_block *nb);
extern int unregister_reset_notifier(struct notifier_block *nb);
extern int call_reset_notifiers(void);
#endif

#if defined(CONFIG_ARM64) && defined(CONFIG_CACHE_ECC_RECORD_ENABLE)
extern int panic_on_cacheecc;
extern void set_panic_on_cacheecc(void);
#endif

#endif /* _CACHE_ECC_CHECK_H */
